package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.IFamilleDao;
import com.adderis.soft.domain.model.Famille;
import com.adderis.soft.service.IFamilleBo;

@Service("familleService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class FamilleServiceImpl implements IFamilleBo {


	@Autowired
	private IFamilleDao familleDao;

	@Transactional(readOnly = false)
	public void persist(Famille transientFamille) {
		familleDao.persist(transientFamille);

	}

	@Transactional(readOnly = false)
	public void remove(Famille persistentFamille) {
		familleDao.remove(persistentFamille);

	}

	@Transactional(readOnly = false)
	public Famille merge(Famille detachedFamille) {

		return familleDao.merge(detachedFamille);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		familleDao.remove(id);

	}

	public Famille findById(Integer id) {
		return familleDao.findById(id);
	}

	public List<Famille> findAll() {
		return familleDao.findAll();
	}

	public List<Famille> search(String searchString) {
		return familleDao.search(searchString);
	}

	

}
